#ifndef SYS_UTIL_H
#define SYS_UTIL_H
#include "bytearray.h"
/*
 *  id -> command id
 *  bResetBa -> 0 unreset , 1 reset ba
 */

int utils_executor_init(bytearray_t* ba, int id, int bRsp, int bResetBa);
int utils_executor_append(bytearray_t* ba, const char* format, ...);
int utils_executor_send(bytearray_t* ba);

int utils_reader_init(bytearray_t* ba, int id, int sig,  int bResetBa);
int utils_reader_append(bytearray_t* ba, const char* format, ...);
int utils_reader_send(bytearray_t* ba);
#endif
